package com.heatup.apt.common.util;

import java.util.Random;

public class CheckCodeUtil {

	
	public CheckCodeUtil() {
	}
	
	/**
	 * 生成6位数随机验证码
	 * @param source
	 * @return
	 */
	public static int getCheckCode(){
		Random random = new Random(System.currentTimeMillis());
		int value = random.nextInt(9999)%10000;
		if(value < 1000){
			value += 1000;
		}
		return value;
	}
	
	
	public static void main(String[] args) {
		
		System.out.println(getCheckCode());
	}
}
